<template>
  <div>
      <a-modal
      :open="open"
      @ok="handleOk"
      @cancel="onClose"
      :footer="null"
      :closable="false"
      :width="560"
      :body-style="bodyStyleModal"
      style="top: 20px;left:20px;margin: 0 0"
      >
          <span style="font-size: 24px">如不准确，请选择您的诊断结果：</span>
          <div class="buttonDiv">
              <div class="btnDiv">
                  <a-button class="btn" @click="submitDoctorResult('CME')">中耳胆脂瘤(CME)</a-button>
                  <a-button class="btn" @click="submitDoctorResult('CSOM')">慢性化脓性中耳炎(CSOM)</a-button>
              </div>
              <div class="btnDiv">
                  <a-button class="btn" @click="submitDoctorResult('EACB')">外耳道出血(EACB)</a-button>
                  <a-button class="btn" @click="submitDoctorResult('IC')">外耳道盯驴栓塞(IC)</a-button>
              </div>
              <div class="btnDiv">
                  <a-button class="btn" @click="submitDoctorResult('OE')">外耳道真菌病(OE)</a-button>
                  <a-button class="btn" @click="submitDoctorResult('SOM')">分泌性中耳炎(SOM)</a-button>
              </div>
              <div class="btnDiv">
                  <a-button class="btn" @click="submitDoctorResult('TMC')">鼓膜钙化(TMC)</a-button>
                  <a-button class="btn" @click="submitDoctorResult('AOM')">急性中耳炎(AOM)</a-button>
              </div>
              <div class="btnDiv">
                  <a-button class="btn">其他</a-button>
                  <a-button class="btn" @click="submitDoctorResult('NE')">健康(NE)</a-button>
              </div>
              <div class="btnDiv" @click="onClose">
                  <a-button class="settingBack"
                            style="color: #fff;font-size: 20px;letter-spacing: 10px;font-weight: 400">返回
                  </a-button>
              </div>
          </div>


      </a-modal>
  </div>
</template>

<script>
import API_BASE_URL from "../../config";
import {getAction} from "@/manage";
import store from "@/store";
export default {
    name: "doctorResult",
    data(){
        return{
            open:false,
            bodyStyleModal:['height:515px'],
            url:`${API_BASE_URL}/set-check-result`
        }
    },
    methods:{
        handleOk(){

        },
        onClose(){
          this.open=false
        },
        submitDoctorResult(arg){
            let checkId = store.state.checkId
            let params={
                id:checkId,
                result:arg
            }
            console.log('checkId',checkId)
            getAction(this.url,params).then((res)=>{
                console.log('res',res)
            })
        }
    }

}
</script>

<style scoped>
.buttonDiv{
    display: grid;
    gap: 30px;
    justify-content: space-between;
    justify-items: stretch;
    margin-top: 15px;
}
.btnDiv{
    gap: 20px;
    display: flex;
    justify-content: center;
}
.btn{
    width: 250px;
    height: 55px;
    background-color: #d9d9d9;
    font-size: 18px;
}
.settingBack {
    margin: auto auto;
    width: 200px;
    height: 45px;
    font-size: 20px;
    border-radius: 9999px;
    background: linear-gradient(45deg, #da72a5, #6a6cb1);
    text-align: center;
    color: white;
}
.backDiv {
    position: absolute;
    bottom: 8px;
    left: 87px;
}
</style>